package com.example.admin.myapplication;


import android.os.Bundle;
import android.app.Fragment;
import android.util.Log;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.Button;
import android.widget.EditText;
import android.widget.Toast;


/**
 * A simple {@link Fragment} subclass.
 */
public class BlankFragment extends Fragment {

    private Button my_btn;

    public BlankFragment() {
        // Required empty public constructor
    }

    @Override
    public View onCreateView(LayoutInflater inflater, ViewGroup container,
                             Bundle savedInstanceState) {
        // Inflate the layout for this fragment
        View view = inflater.inflate(R.layout.fragment_blank, container, false);
        //标题
        final EditText myEditText1 = (EditText)view.findViewById(R.id.editText);
        //内容
        final EditText myEditText = (EditText)view.findViewById(R.id.editText3);
        my_btn = (Button)view.findViewById(R.id.button);
        my_btn.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                //将日志内容保存，并且返回到前一个frag，将标题展现
                String newItem = myEditText.getText().toString();

            }
        });
        return view;
    }
}
